import React, { Component } from 'react'
import {Route,Redirect} from "react-router-dom"
// 路由守卫判断又没有登录
export default class PrivateRoute extends Component {
    render() {
        let isLogin =sessionStorage.getItem("isLogin")
        return (
            <>
            {isLogin ? <Route {...this.props} ></Route> :  <Redirect to="/login"></Redirect>}
        </>
        )
    }
}
